

 
  Vue.component2('a_1_1_1_6_1', {
    template: `
<div   v-show="data.show_flag" min-height="10px"

:class="[

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,

'col-lg-'+data.col_lg,
'col-md-'+data.col_md,
'col-sm-'+data.col_sm,
'col-'+data.col,

{ 'a_1_1_1_6_1_edit': data.__style.__edit_flag__ },
]"
   
   >
  <v-card  class="mx-auto" 
  
:class="[
'mx-auto',
'ea_m-'+data.__style.__padding,
'ea_mx-'+data.__style.__padding_x,
'ea_my-'+data.__style.__padding_y,
'ea_mr-'+data.__style.__padding_right,
'ea_ml-'+data.__style.__padding_left,
'ea_mt-'+data.__style.__padding_top,
'ea_mb-'+data.__style.__padding_bottom,
  ]"
  width="auto" :height="data.height">
      <div ref="body" style="width:100%;height:100%">
      <slot name="body"></slot>
      </div>
  </v-card>
  </div>
  `,  
  data() {
      return {
        data:{
          show_flag:true,
            width:"100%",
            height:"100%",
            
          col_lg: "3",
          col_md: "4",
          col_sm: "6",
          col: "12",
        }
      };
  },
  methods:{
    
      //删除之前显示的插槽
      con_del:function(){
        try{
            this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        let ref=obj.ref;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        new_dom.setAttribute('miaobian','1');
        new_dom.innerHTML="<div  style='height:10px;width:100%;background:red;z-index: 9999;'></div>"
      if (dom !== null) {
        // console.log("在...之前插入",new_dom,dom)
        this.$refs[ref].insertBefore(new_dom, dom);
      } else {
        // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
        this.$refs[ref].appendChild(new_dom);
      }
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        while(1){
            if(dom==this.$refs.father){return null}
            else if(dom==this.$refs.body){
                // console.log("return body")
                return 'body'}
            else{dom=dom.parentNode}
        }
      }
  },
  mounted:function(){
  }
  }
  );
  // 
  